package edu.unr.cater.npap.client.managed.ui;

import com.google.web.bindery.requestfactory.gwt.ui.client.ProxyRenderer;
import edu.unr.cater.npap.client.proxy.AddressProxy;
import edu.unr.cater.npap.client.proxy.ContactProxy;
import java.util.Set;

public class AddressProxyRenderer extends ProxyRenderer<AddressProxy> {

    private static edu.unr.cater.npap.client.managed.ui.AddressProxyRenderer INSTANCE;

    protected AddressProxyRenderer() {
        super(new String[] { "addressStreetLine1" });
    }

    public static edu.unr.cater.npap.client.managed.ui.AddressProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new AddressProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(AddressProxy object) {
        if (object == null) {
            return "";
        }
        return object.getAddressStreetLine1() + " (" + object.getAddressStreetLine1() + ")";
    }
}
